package com.kzw.oa.system.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "dictionary")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Dictionary implements Serializable {
	private static final long serialVersionUID = 3203959469464214270L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long dicId;
	// 字典项目名
	@Column(length = 100)
	private String itemName;
	// 字典项目值
	@Column(length = 100)
	private String itemValue;
	// 描述
	@Column
	private String note;
	// 排序规则
	@Column
	private Integer sn;

	// 所属父结点
	@Column(name = "parent_id")
	private Long parentId;

	// 是否子节点: 1是 0不是
	private Integer leaf = 0;

	// 数据字典代码
	@Column(name = "code_", length = 50)
	private String code;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Dictionary() {
	}

	public Dictionary(Long in_dicId) {
		this.setDicId(in_dicId);
	}

	public Long getDicId() {
		return this.dicId;
	}

	public void setDicId(Long aValue) {
		this.dicId = aValue;
	}

	public String getItemName() {
		return this.itemName;
	}

	public void setItemName(String aValue) {
		this.itemName = aValue;
	}

	public String getItemValue() {
		return this.itemValue;
	}

	public void setItemValue(String aValue) {
		this.itemValue = aValue;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Integer getSn() {
		return sn;
	}

	public void setSn(Integer sn) {
		this.sn = sn;
	}

	public Integer getLeaf() {
		return leaf;
	}

	public void setLeaf(Integer leaf) {
		this.leaf = leaf;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
}
